﻿<!DOCTYPE html>
<!--一脚手架检查表-->
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>

    <style>

        body {
            padding-bottom: 10px;
        }
        .el-col {
            padding: 10px;
            font-size: 14px;
        }
        td {
            padding: 10px;
            font-size: 14px;
        }

        .el-form-item {
            margin-bottom: 0px !important;
        }

        .el-input-group__prepend,
        .el-input__inner {
            color: #000;
            font-size: 14px;
        }

        .el-input-group__prepend {
            padding-left: 0
        }

        .el-input-group__prepend,
        .el-input__inner,
        .el-form-item__label {
            color: #000;
            font-size: 14px;
        }

        .el-input__inner{
            color: #606266!important
        }
        .el-form-item__label{
            padding-left: 0!important;
        }

        .el-input-group__prepend {
            padding-left: 0
        }
    </style>
</head>
<body>
    <div id="app" v-cloak style="">
        <div style="width:100%;text-align:center ">
            <label style="font-weight:bold">脚手架检查表</label>
        </div>
        <div style="width:100%;text-align:right ">
            <label>  {{HotWorkSafetyLicense.ApplicationNumber+mark.m}} {{Form.ProjectNumber}}</label>
        </div>
        <el-form :model="Form" status-icon style="margin-top:5px;width:100%" class="safeCard">
            <!--<el-row type="flex" justify="end">
            <el-col span="23">
                {{ScaffoldingChecklist.ProjectNumber+mark.m}} {{Form.ProjectNumber}}
            </el-col>
        </el-row>-->


            <table style="border:1px  solid; width:100%" cellpadding="0" cellspacing="0">
                <!--项目名称  作业地点-->
                <tr style="border:1px  solid;">
                    <td width="50%" style="border-right:1px solid;border-bottom:1px solid  ">
                        <div class="elst-select-mini">
                            <el-form-item>
                                <el-input type="text" v-model="Form.ProjectName" autocomplete="off" size="mini">
                                    <template slot="prepend">
                                        {{ScaffoldingChecklist.ProjectName+mark.m}}
                                    </template>
                                </el-input>
                            </el-form-item>
                        </div>
                    </td>
                    <td width="50%" style="border-bottom:1px solid">
                        <div class="elst-select-mini">
                            <el-form-item>
                                <el-input type="text" v-model="Form.JobLocation" autocomplete="off" size="mini">
                                    <template slot="prepend">
                                        {{ScaffoldingChecklist.JobLocation+mark.m}}
                                    </template>
                                </el-input>
                            </el-form-item>
                        </div>
                    </td>
                </tr>

                <!--作业单位名称 作业负责人-->
                <tr>
                    <td width="50%" style="border-right:1px solid;border-bottom:1px solid ">
                        <div class="elst-select-mini">
                            <el-form-item>
                                <el-input size="mini">
                                    <template slot="prepend">
                                        <div>{{ScaffoldingChecklist.OperatingUnit+mark.m}}</div>
                                    </template>
                                    <el-select @visible-change="visibleChange" v-model="Form.OperatingUnit" slot="suffix" :placeholder="ScaffoldingChecklist.OperatingUnit">
                                        <el-option label="请选择" value=""></el-option>
                                        <el-option v-for="item in OperatingUnit" :label="item.value" :value="item.key">
                                        </el-option>
                                    </el-select>
                                </el-input>
                            </el-form-item>
                        </div>
                    </td>
                    <td width="50%" style="border-bottom:1px solid">
                        <div class="elst-select-mini">
                            <el-form-item>
                                <el-input size="mini">
                                    <template slot="prepend">
                                        <div>{{ScaffoldingChecklist.RelatedPeople+mark.m}}</div>
                                    </template>
                                    <el-select @visible-change="visibleChange" v-model="Form.RelatedPeople" slot="suffix" :placeholder="ScaffoldingChecklist.RelatedPeople">
                                        <el-option label="请选择" value=""></el-option>
                                        <el-option v-for="item in RelatedPeople" :label="item.value" :value="item.key">
                                        </el-option>
                                    </el-select>
                                </el-input>
                            </el-form-item>
                        </div>
                    </td>
                </tr>

                <!--脚手架检查人--><!--检查时间-->
                <tr>
                    <td width="50%" style="border-right:1px solid;border-bottom:1px solid ">
                        <div class="elst-select-mini">
                            <el-form-item>
                                <el-input size="mini">
                                    <template slot="prepend">
                                        <div>{{ScaffoldingChecklist.ScaffoldingInspector+mark.m}}</div>
                                    </template>
                                    <el-select @visible-change="visibleChange" v-model="Form.ScaffoldingInspector" slot="suffix" :placeholder="ScaffoldingChecklist.ScaffoldingInspector">
                                        <el-option label="请选择" value=""></el-option>
                                        <el-option v-for="item in RelatedPeople" :label="item.value" :value="item.key">
                                        </el-option>
                                    </el-select>
                                </el-input>
                            </el-form-item>
                        </div>
                    </td>
                    <td width="50%" style="border-bottom:1px solid;padding-left:10px">
                        <el-form-item :label="ScaffoldingChecklist.CheckTime+mark.m" class="inputTextarea" >
                            <!-- 弹出页的其它不能成组的控件添加class="inputTextarea"，达到label与input、select等控件的label对齐的目的 -->
                            <el-date-picker v-model="Form.CheckTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
                                            placeholder="选择日期">
                            </el-date-picker>
                        </el-form-item>
                    </td>
                </tr>
                <!--总体结果-->
                <tr>
                    <td width="50%" style="border-right:1px solid;">
                        {{ScaffoldingChecklist.OverallResult}}:
                    </td>
                    <td width="50%">
                        <el-radio-group v-model="Form.OverallResult">
                            <el-radio v-for="item in OverallResult" :label="item.value" :value="item.key">{{item.value}}</el-radio>
                        </el-radio-group>
                    </td>
                </tr>
            </table>
            <!--//检查项目-->
            <table style="border:1px  solid; width:100%; border-top:0px solid" cellpadding="0" cellspacing="0">
                <thead>
                    <tr>
                        <td width="40" style="border-right:1px solid;border-bottom:1px solid;text-align:center">{{ScaffoldingChecklist.CheckContent}}</td>
                        <td width="30" style="border-right:1px solid;border-bottom:1px solid;text-align:center">{{ScaffoldingChecklist.SingleResult}}</td>
                        <td width="30" style="border-bottom:1px solid;text-align:center">{{ScaffoldingChecklist.Remarks}}</td>
                    </tr>
                </thead>
                <tbody v-for="todo in Form.CheckItem">
                    <tr>
                        <td width="40" style="border-right:1px solid;border-bottom:1px solid;">{{todo.CheckContent}}</td>
                        <td width="30" style="border-right:1px solid;border-bottom:1px solid;text-align:center">
                            <el-radio-group v-model="todo.SingleResult">
                                <el-radio v-for="item in SingleResult" :label="item.value" :value="item.key">{{item.value}}</el-radio>
                            </el-radio-group>
                        </td>
                        <td width="30" style="border-bottom:1px solid;text-align:center">
                            <el-input type="text" v-model="todo.Remarks" autocomplete="off" size="mini">
                            </el-input>
                        </td>
                    </tr>
                </tbody>
                <!--特殊要求-->
                <tr>
                    <td colspan="3" style="padding-left:10px">
                        <el-form-item :label="ScaffoldingChecklist.OtherSpecialRequirements+mark.m" prop="zhu" class="inputTextarea">
                            <el-input type="textarea" v-model="Form.OtherSpecialRequirements" autocomplete="off"></el-input>
                        </el-form-item>
                    </td>
                </tr>
            </table>
            {{ScaffoldingChecklist.zhu}}
            <el-row>
                <el-form-item style="text-align:center; padding-top:5px">
                    <el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnSave}}</el-button>
                    <el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnCommit}}</el-button>
                </el-form-item>
            </el-row>
        </el-form>
        <el-dialog title="" :visible.sync="ListItem.dialogVisible" width="90%" height="95%" top="10vh">
            <iframe ref="iframe" :src="ListItem.InputUrl" style="height:95%;width:100%" frameborder="0"></iframe>
        </el-dialog>
    </div>
    <script type="text/javascript">
        app = new Vue({
            el: '#app',
            data: {
                id: '',
                Form: {
                    id: guidEmpty,
                    ProjectNumber: '',
                    ProjectName:'',
                    JobLocation: '',
                    OperatingUnit: '',
                    RelatedPeople:'',
                    ScaffoldingInspector:'',
                    CheckTime:'',
                    OverallResult: '',
                    CheckItem:'',
                    OtherSpecialRequirements: '',
                },
                OverallResult: [],
                OperatingUnit: [],
                RelatedPeople: [],
                SingleResult: [],
                ListItem: ListItem,
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                getData: function () {
                    getDataAdd(this, '/api/ScaffoldingChecklist/get?id=' + this.id);
                },
                //提交数据
                onSubmitForm: function (formName) {
                    var mythis = this;
                    //this.$refs[formName].validate(function (valid) {
                    //    //验证通过
                    //    if (valid) {
                    onSubmitForm(this, '/api/ScaffoldingChecklist/Save', mythis.Form);
                    //} else {
                    //    //验证失败
                    //    return false;
                    //}
                    //});
                },
            },
            mounted: function () {
                var list = getDicDataArray(['123', '09', '08','124' ]);
                this.OperatingUnit = getDicDatafromArray('08', list);//工作类型
                this.OverallResult = getDicDatafromArray('123', list);//工作类型
                this.RelatedPeople = getDicDatafromArray("09", list);//批准人
                this.SingleResult = getDicDatafromArray("124", list);//作业区域
                this.id = getUrlParam("id");
                this.getData();
            }
        });
    </script>
</body>
</html>